//    Copyright (C) Kherty.  All rights reserved.
using System;
using System.Windows.Media;
using OpenLS.Core.Serialization;

namespace OpenLS.Drawing
{
    class Path2DQuadBezierTo: PathElement
    {
        private AdjPoint2D pt1;
        private AdjPoint2D pt2;
        internal const string xmlName = "quadBezTo";
        public override PathSegment Segment
        {
            get { throw new NotImplementedException(); }
        }

        internal override void ReadXmlCore(ReadContext context)
        {
         using (var c = context.Read(xmlName))
         {
             pt1 = c.ReadElementAs<AdjPoint2D>("pt");
             pt2 = c.ReadElementAs<AdjPoint2D>("pt");
         }
        }

        internal override void WriteXmlCore(WriteContext context)
        {
            using (var c = context.Write(xmlName))
            {
                c.WriteElementAs(pt1, "pt");
                c.WriteElementAs(pt2, "pt");
            }
        }
    }
}